<?php

/**
 * 用户好友值抽奖配置表
 */

namespace App\Models\MainDB\Shareprize;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class ShareprizeConfig extends Model
{

    protected $table = 'ln_shareprize_config';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    protected $fillable = [
        "id",
        "month",
        "start_time",
        "end_time",
        "sort",
        "prize_type",
        "cate_id",
        "product_id",
        "product_name",
        "number",
        "prize_choose_type",
        "cost",
        "is_show",
    ];

    public $timestamps = false;

    public function addAll(array $data)
    {
        $rs = DB::table($this->getTable())->insert($data);
        return $rs;
    }
}
